home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Internet News 2001 June
/
Internet News 2001-06 - CD-ROM.rar
/
INCD200106.ISO
/
mac
/
Netscape 6
/
Installer Modules
/
FullCircle.xpi
/
install.js
Wrap
Text File
|
2001-01-31
|
2KB
|
57 lines
// this function verifies disk space in kilobytes
function verifyDiskSpace(dirPath, spaceRequired)
{
var spaceAvailable;
// Get the available disk space on the given path
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
// Convert the available disk space into kilobytes
spaceAvailable = parseInt(spaceAvailable / 1024);
// do the verification
if(spaceAvailable < spaceRequired)
{
logComment("Insufficient disk space: " + dirPath);
logComment(" required : " + spaceRequired + " K");
logComment(" available: " + spaceAvailable + " K");
return(false);
}
return(true);
}
var srDest = 476;
var err = initInstall("FullCircle Talkback", "FullCircle", "6.0.1.2001013113");
logComment("initInstall: " + err);
var communicatorFolder = getFolder("Program");
logComment("communicatorFolder: " + communicatorFolder);
if (verifyDiskSpace(communicatorFolder, srDest))
{
err = addDirectory("Talkback",
"6.0.1.2001013113",
"viewer", // jar source folder
communicatorFolder, // target folder
"", // target subdir
true ); // force flag
logComment("addDirectory() returned: " + err);
if (err==SUCCESS)
{
err = performInstall();
logComment("performInstall() returned: " + err);
}
else
{
cancelInstall(err);
logComment("cancelInstall() due to error: " + err)
}
}
else
cancelInstall(INSUFFICIENT_DISK_SPACE);